<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    
</head>
<body>
    <template>
        <el-button type="text" @click="open">点击打开 Message Box</el-button>
    </template>
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script>
    export default {
        methods: {
        open() {
            this.$alert('这是一段内容', '标题名称', {
            confirmButtonText: '确定',
            callback: action => {
                this.$message({
                type: 'info',
                message: `action: ${ action }`
                });
            }
            });
        }
        }
    }
    </script>
</body>
</html>